#include <REGX52.H>
#include <intrins.h>

void Delay1ms(unsigned int ms)		//@11.0592MHz
{
	unsigned char i, j;

	_nop_();
	
	
	while(ms){
		i = 2;
		j = 199;
		
		do
		{
			while (--j);
		} while (--i);
		
		ms--;
	}
}

void main()
{
	unsigned char i = 8;
	
	while(1)
	{
		i = 8;
		do{
			P2 = ~(1 << i);
			Delay1ms(200);
		}while(i--);
	}
}